################################################
# Analysis for:
#
# Jordan, Soren, Grant Ferguson, and Kathryn Haglin. "Measuring and 
#  Manipulating Support for Universal Basic Income." Forthcoming at Social Policy & Administration. 
#  Partially funded by a Hayek Fundaward for $3,000. DOI: 10.1111/SPOL.12760
#
# Required files: UBI experiment.csv
#                 UBI full.csv
#
################################################

library(interactions)
library(ggplot2)
library(gridExtra)
library(stargazer)
library(ATE)
library(tm)
library(wordcloud)
library(wordcloud2)
library(magrittr) # for fancy piping

data <- read.csv("UBI experiment.csv")
names(data)

# TOO_FAST: 
#	1 = zoomed through at least one module
# 	0 = normal pace

# SLIDER_ATTN_CHECK_CORRECT: 
#	1 = got the slider attention check
#	0 = did not

# UBI_SUPPORT:
#	1 = not at all likely to support
#	2 = not very likely to support
#	3 = neither likely nor unlikely
#	4 = somewhat likely to support
#	5 = very likely to support

# UBI_BINARY:
#	1 = very likely to support/somewhat likely to support
#	0 = not at all likely to support/not very likely to support/neither likely nor unlikely

# RETRO:
# 	1 = Gotten much better (in the last 12 months, the economy ....)
# 	2 = Gotten somewhat better
# 	3 = Stayed about the same 
# 	4 = Gotten somewhat worse
# 	5 = Gotten much worse

# PROSPECT:
# 	1 = Get much better (in the last 12 months, the economy ....)
# 	2 = Get somewhat better
# 	3 = Stay about the same 
# 	4 = Get somewhat worse
# 	5 = Get much worse

# DEFICIT:
# 	1 = Extremely important (to reduce the deficit)
# 	2 = Very important
# 	3 = Moderately important
# 	4 = Slightly important
# 	5 = Not at all important (to reduce the deficit)

# INCOME:
# 	1 = Less than $10,000
#	2 = $10,000 - $19,999
#	3 = $20,000 - $29,999
#	4 = $30,000 - $39,999
#	5 = $40,000 - $49,999
#	6 = $50,000 - $59,999
#	7 = $60,000 - $69,999 
#	8 = $70,000 - $79,999
#	9 = $80,000 - $89,999
#	10 = $90,000 - $99,999
#	11 = $100,000 - $149,999
#	12 = More than $150,000

# EDUC:
# 	1 = Less than 6th grade
#	2 = Did not graduate high school
#	3 = High school equivalent
#	4 = Some college but no degree
#	5 = Associate's degree
#	6 = Bachelor's degree
#	7 = Advanced degree

# UBI_OE / AUTOMATION_OE: open-ended responses                                                                                                                                   

# POL_TREAT_NUM:
#	-1 = negative treatment (too expensive)
#	0 = nothing
#	1 = positive treatment (help solve unemployment automation)

# VAL_TREAT_NUM:
#	-1 = negative treatment (encourage laziness)
#	0 = nothing
#	1 = positive treatment (more fair by reducing inequality)

# TREATMENT:
#              VAL
#      N        C       P
#    _______________________
# N |   1   |   2   |   3   |		
#   |_______|_______|_______|
# C |   4   |   0   |   6   |		POL
#   |_______|_______|_______|
# P |   5   |   7   |   8   |		
#   |_______|_______|_______|

# IDEOLOGY:
#	 1 = Extremely/very conservative
#	 2 = Conservative
#	 3 = Slightly conservative
#	 4 = Moderate, middle of the road
#	 5 = Slightly liberal
#	 6 = Liberal
#	 7 = Extremely/very liberal

# PID:
#	1 = Strong Republican
#	2 = Not very strong Republican/Don't know how strong (but Republican)
#	3 = Lean Republican
#	4 = Neither/true independent/don't kow
#	5 = Lean Democrat
#	6 = Not very strong Democrat/Don't know how strong (but Democrat)
#	7 = Strong Democrat

# OTHERRACE:
#	1 = Other race (not white)
#	0 = White

# FEMALE:
#	1 = Female
#	0 = Non-female 

# VOTEYES:
#	1 = Voted for president in 2016
#	0 = Non-female 

# EMPLOYED:
#	1 = Has a current occupation
#	0 = Does not have a current occupation

# GOVT_JOBS_GOOD:
#	1 = Strongly disapprove (government should not see to jobs and standard of living)
#	2 = Somewhat disapprove
#	3 = Neither approve nor disapprove
#	4 = Somewhat approve
# 	5 = Strongly approve (government should see to jobs and standard of living)

# Create binary versions of the value treatment, policy treatment, ideology, and party ID

data$VAL_TREAT <- data$VAL_TREAT_NUM
data$VAL_TREAT[data$VAL_TREAT == 0] <- -9 # change the neutral to a crazy negative number so it's the baseline

data$POL_TREAT <- data$POL_TREAT_NUM
data$POL_TREAT[data$POL_TREAT == 0] <- -9 # change the neutral to a crazy negative number so it's the baseline

data$IDEO_BIN <- data$IDEOLOGY - 4
data$IDEO_BIN[data$IDEO_BIN < 0] <- -1
data$IDEO_BIN[data$IDEO_BIN > 0] <- 1
table(data$IDEOLOGY, data$IDEO_BIN)

data$PID_BIN <- data$PID - 4
data$PID_BIN[data$PID_BIN < 0] <- -1
data$PID_BIN[data$PID_BIN > 0] <- 1
table(data$PID, data$PID_BIN)

perfect.rs <- data[(data$TOO_FAST == 0 & data$SLIDER_ATTN_CHECK_CORRECT == 1),]

dim(data)
dim(perfect.rs)




############################################################
#  Main paper
############################################################

################ 1. Open-ended reflections of treatments:
data$UBI_OE[data$TREATMENT == 0][10]   # positive policy: AI (DEM)
data$PID_BIN[data$TREATMENT == 0][10] 
data$UBI_OE[data$TREATMENT == 0][97]   # positive policy: robots (INDP)
data$PID_BIN[data$TREATMENT == 0][97] 
data$UBI_OE[data$TREATMENT == 0][74]   # negative policy: expensive  (DEM)
data$PID_BIN[data$TREATMENT == 0][74] 
data$UBI_OE[data$TREATMENT == 0][312]   # negative policy: expensive (DEM)
data$PID_BIN[data$TREATMENT == 0][312] 
data$UBI_OE[data$TREATMENT == 0][23]   # positive value: inequality (DEM)
data$PID_BIN[data$TREATMENT == 0][23] 
data$UBI_OE[data$TREATMENT == 0][262]   # positive value: inequality (DEM)
data$PID_BIN[data$TREATMENT == 0][262] 
data$UBI_OE[data$TREATMENT == 0][53]   # negative value: hard work (REP)
data$PID_BIN[data$TREATMENT == 0][53] 
data$UBI_OE[data$TREATMENT == 0][340]  # negative value: unfair (DEM)
data$PID_BIN[data$TREATMENT == 0][340] 




################ 2. Estimate models. (for each: all, ``perfect'' respondents, and binary):

# Collapse to binary to make it easier to interpret
model.b1b <- lm(UBI_SUPPORT ~ as.factor(VAL_TREAT) + as.factor(POL_TREAT) + PID_BIN + IDEO_BIN +
		INCOME + RETRO + PROSPECT + DEFICIT + VOTEYES + EMPLOYED + EDUC +
		as.factor(VAL_TREAT):PID_BIN + as.factor(VAL_TREAT):IDEO_BIN +
		as.factor(POL_TREAT):PID_BIN + as.factor(POL_TREAT):IDEO_BIN, data = data)
summary(model.b1b)

# Check with the perfect rs
model.b1b.prs <- lm(UBI_SUPPORT ~ as.factor(VAL_TREAT) + as.factor(POL_TREAT) + PID_BIN + IDEO_BIN +
		INCOME + RETRO + PROSPECT + DEFICIT + VOTEYES + EMPLOYED + EDUC +
		as.factor(VAL_TREAT):PID_BIN + as.factor(VAL_TREAT):IDEO_BIN +
		as.factor(POL_TREAT):PID_BIN + as.factor(POL_TREAT):IDEO_BIN, data = perfect.rs)
summary(model.b1b.prs) # Basically all the same


# Dataframe for fits for interpretation
val.neg.treat <- rep(c(rep(1, 3), rep(0, 6)), length.out = 81)
val.no.treat <- rep(c(rep(0, 3), rep(1, 3), rep(0, 3)), length.out = 81)
val.pos.treat <- rep(c(rep(0, 6), rep(1, 3)), length.out = 81)

pol.neg.treat <- rep(rep(c(1, 0, 0), 3), length.out = 81)
pol.no.treat <- rep(rep(c(0, 1, 0), 3), length.out = 81)
pol.pos.treat <- rep(rep(c(0, 0, 1), 3), length.out = 81)

pid.vals <- rep(c(rep(-1, 9), rep(0, 9), rep(1, 9)), length.out = 81)
ideo.vals <- c(rep(-1, 27), rep(0, 27), rep(1, 27))

model.b1b.data.to.predict <- data.frame(VAL_TREAT = (val.neg.treat*(-1) + val.pos.treat),
										POL_TREAT = (pol.neg.treat*(-1) + pol.pos.treat), 
										PID_BIN = pid.vals, IDEO_BIN = ideo.vals,
										INCOME = mean(data$INCOME), RETRO = mean(data$RETRO), 
										PROSPECT = mean(data$PROSPECT), DEFICIT = mean(data$DEFICIT), 
										VOTEYES = 1, EMPLOYED = 1, EDUC = mean(data$EDUC))

model.b1b.data.to.predict$VAL_TREAT[model.b1b.data.to.predict$VAL_TREAT == 0] <- -9
model.b1b.data.to.predict$POL_TREAT[model.b1b.data.to.predict$POL_TREAT == 0] <- -9

ubi.pred.supp <- predict(model.b1b, model.b1b.data.to.predict, se.fit = TRUE)

model.b1b.fits.data <- data.frame(UBISUPPORT = ubi.pred.supp$fit,
								UBI.lower = (ubi.pred.supp$fit - 1.96*ubi.pred.supp$se.fit),
								UBI.upper = (ubi.pred.supp$fit + 1.96*ubi.pred.supp$se.fit),
								VALN = val.neg.treat, VALC = val.no.treat, VALP = val.pos.treat, 
								POLN = pol.neg.treat, POLC = pol.no.treat, POLP = pol.pos.treat, 
								PID_BIN = pid.vals, IDEO_BIN = ideo.vals)

model.b1b.fits.data$POLTREAT <- NA
model.b1b.fits.data$VALTREAT <- NA
model.b1b.fits.data$PIDCAT <- NA
model.b1b.fits.data$IDEOCAT <- NA

for(i in 1:length(model.b1b.fits.data$VALN)) {
	model.b1b.fits.data$POLTREAT[i] <- ifelse(model.b1b.fits.data$POLP[i] == 1, "Positive", model.b1b.fits.data$POLTREAT[i])
	model.b1b.fits.data$POLTREAT[i] <- ifelse(model.b1b.fits.data$POLC[i] == 1, "Control", model.b1b.fits.data$POLTREAT[i])
	model.b1b.fits.data$POLTREAT[i] <- ifelse(model.b1b.fits.data$POLN[i] == 1, "Negative", model.b1b.fits.data$POLTREAT[i])
	model.b1b.fits.data$VALTREAT[i] <- ifelse(model.b1b.fits.data$VALP[i] == 1, "Positive", model.b1b.fits.data$VALTREAT[i])
	model.b1b.fits.data$VALTREAT[i] <- ifelse(model.b1b.fits.data$VALC[i] == 1, "Control", model.b1b.fits.data$VALTREAT[i])
	model.b1b.fits.data$VALTREAT[i] <- ifelse(model.b1b.fits.data$VALN[i] == 1, "Negative", model.b1b.fits.data$VALTREAT[i])
	model.b1b.fits.data$PIDCAT[i] <- ifelse(model.b1b.fits.data$PID_BIN[i] == -1, "Republican", model.b1b.fits.data$PIDCAT[i])
	model.b1b.fits.data$PIDCAT[i] <- ifelse(model.b1b.fits.data$PID_BIN[i] == 0, "Independent", model.b1b.fits.data$PIDCAT[i])
	model.b1b.fits.data$PIDCAT[i] <- ifelse(model.b1b.fits.data$PID_BIN[i] == 1, "Democrat", model.b1b.fits.data$PIDCAT[i])
	model.b1b.fits.data$IDEOCAT[i] <- ifelse(model.b1b.fits.data$IDEO_BIN[i] == -1, "Conservative", model.b1b.fits.data$IDEOCAT[i])
	model.b1b.fits.data$IDEOCAT[i] <- ifelse(model.b1b.fits.data$IDEO_BIN[i] == 0, "Moderate", model.b1b.fits.data$IDEOCAT[i])
	model.b1b.fits.data$IDEOCAT[i] <- ifelse(model.b1b.fits.data$IDEO_BIN[i] == 1, "Liberal", model.b1b.fits.data$IDEOCAT[i])	
}

# Reorder the factors to make plotting easier.
model.b1b.fits.data$Ideology <- model.b1b.fits.data$IDEOCAT <- factor(model.b1b.fits.data$IDEOCAT, levels = c("Conservative", "Moderate", "Liberal"))
model.b1b.fits.data$PID <- model.b1b.fits.data$PIDCAT <- factor(model.b1b.fits.data$PIDCAT, levels = c("Republican", "Independent", "Democrat"))
model.b1b.fits.data$VALTREAT <- factor(model.b1b.fits.data$VALTREAT, levels = c("Negative", "Control", "Positive"))
model.b1b.fits.data$POLTREAT <- factor(model.b1b.fits.data$POLTREAT, levels = c("Negative", "Control", "Positive"))

model.b1b.fits.data$VALNUM <- model.b1b.data.to.predict$VAL_TREAT
model.b1b.fits.data$VALNUM[model.b1b.fits.data$VALNUM == -9] <- 0

model.b1b.fits.data$POLNUM <- model.b1b.data.to.predict$POL_TREAT
model.b1b.fits.data$POLNUM[model.b1b.fits.data$POLNUM == -9] <- 0

for(i in 1:length(model.b1b.fits.data$VALNUM)) {
	model.b1b.fits.data$VALNUM[i] <- ifelse(model.b1b.fits.data$POLNUM[i] == -1,
										model.b1b.fits.data$VALNUM[i] - 0.2, model.b1b.fits.data$VALNUM[i])
	model.b1b.fits.data$VALNUM[i] <- ifelse(model.b1b.fits.data$POLNUM[i] == 1,
										model.b1b.fits.data$VALNUM[i] + 0.2, model.b1b.fits.data$VALNUM[i])
}


#pdf("interactions.pdf")  #  Figure 1
ggplot(data = model.b1b.fits.data, aes(VALNUM, UBISUPPORT, shape = POLTREAT)) + 
	geom_errorbar(aes(ymin = UBI.lower, ymax = UBI.upper), width = 0.1) +	
	geom_point(size = 3) +
	scale_colour_grey(start = 0.8, end = 0) +
	scale_x_continuous(minor_breaks = NULL, breaks = seq(-1, 1, 1), labels = c("Negative", "Control", "Positive")) +
	facet_grid(vars(Ideology), vars(PID), labeller = label_both) +
	labs(shape = "Policy Treatment", x = "Value Treatment", y = "Support for UBI") +
	theme_bw()
dev.off()


################ 3. Placebo test robustness
model.collapsetreats.allcovs.placebo <- lm(GOVT_JOBS_GOOD ~ as.factor(VAL_TREAT) + as.factor(POL_TREAT) + PID + IDEOLOGY +
		INCOME + RETRO + PROSPECT + DEFICIT + VOTEYES + EMPLOYED + EDUC, data = data)
summary(model.collapsetreats.allcovs.placebo) # all close to zero, insignificant

# Are the two related? very much so
cor.test(data$UBI_SUPPORT, data$GOVT_JOBS_GOOD)






















############################################################
#  Appendix
############################################################

################ 1. Randomization check: descriptives by the conditions

# TREATMENT:
#              VAL
#      N        C       P
#    _______________________
# N | -1,-1 | -1,-9 | -1, 1 |		
#   |_______|_______|_______|
# C | -9,-1 | -9,-9 | -9, 1 |		POL
#   |_______|_______|_______|
# P |  1,-1 |  1,-9 |  1, 1 |		
#   |_______|_______|_______|

# Treatments not included: randomized.
the.vars <- c(names(coef(model.b1b))[6:14])
the.var.list <- c("Party ID (Democrat)", "Ideology (liberal)", "Income", 
						"Economic retrospections", "Economic prospections", 
						"Concern for deficit (less)", "Voted in 2016", 
						"Employed", "Education level")

# Run me as a chunk
cat(
	paste(paste("Variables", "(-) Policy; (-) Value", "(-) Policy; (N) Value", "(-) Policy; (+) Value", sep = " & "), "\\\\", sep = " "), "\n",
	paste(paste(the.var.list[1], format(mean(data$PID_BIN[data$POL_TREAT == -1 & data$VAL_TREAT == -1]), digits = 3, nsmall = 3), 
		format(mean(data$PID_BIN[data$POL_TREAT == -1 & data$VAL_TREAT == -9]), digits = 3, nsmall = 3),
		format(mean(data$PID_BIN[data$POL_TREAT == -1 & data$VAL_TREAT ==  1]), digits = 3, nsmall = 3), sep = " & "), "\\\\", sep = " "), "\n",
	paste(paste(the.var.list[2], format(mean(data$IDEO_BIN[data$POL_TREAT == -1 & data$VAL_TREAT == -1]), digits = 3, nsmall = 3), 
		format(mean(data$IDEO_BIN[data$POL_TREAT == -1 & data$VAL_TREAT == -9]), digits = 3, nsmall = 3),
		format(mean(data$IDEO_BIN[data$POL_TREAT == -1 & data$VAL_TREAT ==  1]), digits = 3, nsmall = 3), sep = " & "), "\\\\", sep = " "), "\n",
	paste(paste(the.var.list[3], format(mean(data$INCOME[data$POL_TREAT == -1 & data$VAL_TREAT == -1]), digits = 3, nsmall = 3), 
		format(mean(data$INCOME[data$POL_TREAT == -1 & data$VAL_TREAT == -9]), digits = 3, nsmall = 3),
		format(mean(data$INCOME[data$POL_TREAT == -1 & data$VAL_TREAT ==  1]), digits = 3, nsmall = 3), sep = " & "), "\\\\", sep = " "), "\n",
	paste(paste(the.var.list[4], format(mean(data$RETRO[data$POL_TREAT == -1 & data$VAL_TREAT == -1]), digits = 3, nsmall = 3), 
		format(mean(data$RETRO[data$POL_TREAT == -1 & data$VAL_TREAT == -9]), digits = 3, nsmall = 3),
		format(mean(data$RETRO[data$POL_TREAT == -1 & data$VAL_TREAT ==  1]), digits = 3, nsmall = 3), sep = " & "), "\\\\", sep = " "), "\n",
	paste(paste(the.var.list[5], format(mean(data$PROSPECT[data$POL_TREAT == -1 & data$VAL_TREAT == -1]), digits = 3, nsmall = 3), 
		format(mean(data$PROSPECT[data$POL_TREAT == -1 & data$VAL_TREAT == -9]), digits = 3, nsmall = 3),
		format(mean(data$PROSPECT[data$POL_TREAT == -1 & data$VAL_TREAT ==  1]), digits = 3, nsmall = 3), sep = " & "), "\\\\", sep = " "), "\n",
	paste(paste(the.var.list[6], format(mean(data$DEFICIT[data$POL_TREAT == -1 & data$VAL_TREAT == -1]), digits = 3, nsmall = 3), 
		format(mean(data$DEFICIT[data$POL_TREAT == -1 & data$VAL_TREAT == -9]), digits = 3, nsmall = 3),
		format(mean(data$DEFICIT[data$POL_TREAT == -1 & data$VAL_TREAT ==  1]), digits = 3, nsmall = 3), sep = " & "), "\\\\", sep = " "), "\n",
	paste(paste(the.var.list[7], format(mean(data$VOTEYES[data$POL_TREAT == -1 & data$VAL_TREAT == -1]), digits = 3, nsmall = 3), 
		format(mean(data$VOTEYES[data$POL_TREAT == -1 & data$VAL_TREAT == -9]), digits = 3, nsmall = 3),
		format(mean(data$VOTEYES[data$POL_TREAT == -1 & data$VAL_TREAT ==  1]), digits = 3, nsmall = 3), sep = " & "), "\\\\", sep = " "), "\n",
	paste(paste(the.var.list[8], format(mean(data$EMPLOYED[data$POL_TREAT == -1 & data$VAL_TREAT == -1]), digits = 3, nsmall = 3), 
		format(mean(data$EMPLOYED[data$POL_TREAT == -1 & data$VAL_TREAT == -9]), digits = 3, nsmall = 3),
		format(mean(data$EMPLOYED[data$POL_TREAT == -1 & data$VAL_TREAT ==  1]), digits = 3, nsmall = 3), sep = " & "), "\\\\", sep = " "), "\n",
	paste(paste(the.var.list[9], format(mean(data$EDUC[data$POL_TREAT == -1 & data$VAL_TREAT == -1]), digits = 3, nsmall = 3), 
		format(mean(data$EDUC[data$POL_TREAT == -1 & data$VAL_TREAT == -9]), digits = 3, nsmall = 3),
		format(mean(data$EDUC[data$POL_TREAT == -1 & data$VAL_TREAT ==  1]), digits = 3, nsmall = 3), sep = " & "), "\\\\", sep = " "), "\n",
		paste("\\", "hline", sep = ""), "\n",
	paste(paste("Variables", "(N) Policy; (-) Value", "(N) Policy; (N) Value", "(N) Pol; (+) Value", sep = " & "), "\\\\", sep = " "), "\n",
	paste(paste(the.var.list[1], format(mean(data$PID_BIN[data$POL_TREAT == -9 & data$VAL_TREAT == -1]), digits = 3, nsmall = 3), 
		format(mean(data$PID_BIN[data$POL_TREAT == -9 & data$VAL_TREAT == -9]), digits = 3, nsmall = 3),
		format(mean(data$PID_BIN[data$POL_TREAT == -9 & data$VAL_TREAT ==  1]), digits = 3, nsmall = 3), sep = " & "), "\\\\", sep = " "), "\n",
	paste(paste(the.var.list[2], format(mean(data$IDEO_BIN[data$POL_TREAT == -9 & data$VAL_TREAT == -1]), digits = 3, nsmall = 3), 
		format(mean(data$IDEO_BIN[data$POL_TREAT == -9 & data$VAL_TREAT == -9]), digits = 3, nsmall = 3),
		format(mean(data$IDEO_BIN[data$POL_TREAT == -9 & data$VAL_TREAT ==  1]), digits = 3, nsmall = 3), sep = " & "), "\\\\", sep = " "), "\n",
	paste(paste(the.var.list[3], format(mean(data$INCOME[data$POL_TREAT == -9 & data$VAL_TREAT == -1]), digits = 3, nsmall = 3), 
		format(mean(data$INCOME[data$POL_TREAT == -9 & data$VAL_TREAT == -9]), digits = 3, nsmall = 3),
		format(mean(data$INCOME[data$POL_TREAT == -9 & data$VAL_TREAT ==  1]), digits = 3, nsmall = 3), sep = " & "), "\\\\", sep = " "), "\n",
	paste(paste(the.var.list[4], format(mean(data$RETRO[data$POL_TREAT == -9 & data$VAL_TREAT == -1]), digits = 3, nsmall = 3), 
		format(mean(data$RETRO[data$POL_TREAT == -9 & data$VAL_TREAT == -9]), digits = 3, nsmall = 3),
		format(mean(data$RETRO[data$POL_TREAT == -9 & data$VAL_TREAT ==  1]), digits = 3, nsmall = 3), sep = " & "), "\\\\", sep = " "), "\n",
	paste(paste(the.var.list[5], format(mean(data$PROSPECT[data$POL_TREAT == -9 & data$VAL_TREAT == -1]), digits = 3, nsmall = 3), 
		format(mean(data$PROSPECT[data$POL_TREAT == -9 & data$VAL_TREAT == -9]), digits = 3, nsmall = 3),
		format(mean(data$PROSPECT[data$POL_TREAT == -9 & data$VAL_TREAT ==  1]), digits = 3, nsmall = 3), sep = " & "), "\\\\", sep = " "), "\n",
	paste(paste(the.var.list[6], format(mean(data$DEFICIT[data$POL_TREAT == -9 & data$VAL_TREAT == -1]), digits = 3, nsmall = 3), 
		format(mean(data$DEFICIT[data$POL_TREAT == -9 & data$VAL_TREAT == -9]), digits = 3, nsmall = 3),
		format(mean(data$DEFICIT[data$POL_TREAT == -9 & data$VAL_TREAT ==  1]), digits = 3, nsmall = 3), sep = " & "), "\\\\", sep = " "), "\n",
	paste(paste(the.var.list[7], format(mean(data$VOTEYES[data$POL_TREAT == -9 & data$VAL_TREAT == -1]), digits = 3, nsmall = 3), 
		format(mean(data$VOTEYES[data$POL_TREAT == -9 & data$VAL_TREAT == -9]), digits = 3, nsmall = 3),
		format(mean(data$VOTEYES[data$POL_TREAT == -9 & data$VAL_TREAT ==  1]), digits = 3, nsmall = 3), sep = " & "), "\\\\", sep = " "), "\n",
	paste(paste(the.var.list[8], format(mean(data$EMPLOYED[data$POL_TREAT == -9 & data$VAL_TREAT == -1]), digits = 3, nsmall = 3), 
		format(mean(data$EMPLOYED[data$POL_TREAT == -9 & data$VAL_TREAT == -9]), digits = 3, nsmall = 3),
		format(mean(data$EMPLOYED[data$POL_TREAT == -9 & data$VAL_TREAT ==  1]), digits = 3, nsmall = 3), sep = " & "), "\\\\", sep = " "), "\n",
	paste(paste(the.var.list[9], format(mean(data$EDUC[data$POL_TREAT == -9 & data$VAL_TREAT == -1]), digits = 3, nsmall = 3), 
		format(mean(data$EDUC[data$POL_TREAT == -9 & data$VAL_TREAT == -9]), digits = 3, nsmall = 3),
		format(mean(data$EDUC[data$POL_TREAT == -9 & data$VAL_TREAT ==  1]), digits = 3, nsmall = 3), sep = " & "), "\\\\", sep = " "), "\n",
		paste("\\", "hline", sep = ""), "\n",
	paste(paste("Variables", "(+) Policy; (-) Value", "(+) Policy; (N) Value", "(+) Policy; (+) Value", sep = " & "), "\\\\", sep = " "), "\n",
	paste(paste(the.var.list[1], format(mean(data$PID_BIN[data$POL_TREAT == 1 & data$VAL_TREAT == -1]), digits = 3, nsmall = 3), 
		format(mean(data$PID_BIN[data$POL_TREAT == 1 & data$VAL_TREAT == -9]), digits = 3, nsmall = 3),
		format(mean(data$PID_BIN[data$POL_TREAT == 1 & data$VAL_TREAT ==  1]), digits = 3, nsmall = 3), sep = " & "), "\\\\", sep = " "), "\n",
	paste(paste(the.var.list[2], format(mean(data$IDEO_BIN[data$POL_TREAT == 1 & data$VAL_TREAT == -1]), digits = 3, nsmall = 3), 
		format(mean(data$IDEO_BIN[data$POL_TREAT == 1 & data$VAL_TREAT == -9]), digits = 3, nsmall = 3),
		format(mean(data$IDEO_BIN[data$POL_TREAT == 1 & data$VAL_TREAT ==  1]), digits = 3, nsmall = 3), sep = " & "), "\\\\", sep = " "), "\n",
	paste(paste(the.var.list[3], format(mean(data$INCOME[data$POL_TREAT == 1 & data$VAL_TREAT == -1]), digits = 3, nsmall = 3), 
		format(mean(data$INCOME[data$POL_TREAT == 1 & data$VAL_TREAT == -9]), digits = 3, nsmall = 3),
		format(mean(data$INCOME[data$POL_TREAT == 1 & data$VAL_TREAT ==  1]), digits = 3, nsmall = 3), sep = " & "), "\\\\", sep = " "), "\n",
	paste(paste(the.var.list[4], format(mean(data$RETRO[data$POL_TREAT == 1 & data$VAL_TREAT == -1]), digits = 3, nsmall = 3), 
		format(mean(data$RETRO[data$POL_TREAT == 1 & data$VAL_TREAT == -9]), digits = 3, nsmall = 3),
		format(mean(data$RETRO[data$POL_TREAT == 1 & data$VAL_TREAT ==  1]), digits = 3, nsmall = 3), sep = " & "), "\\\\", sep = " "), "\n",
	paste(paste(the.var.list[5], format(mean(data$PROSPECT[data$POL_TREAT == 1 & data$VAL_TREAT == -1]), digits = 3, nsmall = 3), 
		format(mean(data$PROSPECT[data$POL_TREAT == 1 & data$VAL_TREAT == -9]), digits = 3, nsmall = 3),
		format(mean(data$PROSPECT[data$POL_TREAT == 1 & data$VAL_TREAT ==  1]), digits = 3, nsmall = 3), sep = " & "), "\\\\", sep = " "), "\n",
	paste(paste(the.var.list[6], format(mean(data$DEFICIT[data$POL_TREAT == 1 & data$VAL_TREAT == -1]), digits = 3, nsmall = 3), 
		format(mean(data$DEFICIT[data$POL_TREAT == 1 & data$VAL_TREAT == -9]), digits = 3, nsmall = 3),
		format(mean(data$DEFICIT[data$POL_TREAT == 1 & data$VAL_TREAT ==  1]), digits = 3, nsmall = 3), sep = " & "), "\\\\", sep = " "), "\n",
	paste(paste(the.var.list[7], format(mean(data$VOTEYES[data$POL_TREAT == 1 & data$VAL_TREAT == -1]), digits = 3, nsmall = 3), 
		format(mean(data$VOTEYES[data$POL_TREAT == 1 & data$VAL_TREAT == -9]), digits = 3, nsmall = 3),
		format(mean(data$VOTEYES[data$POL_TREAT == 1 & data$VAL_TREAT ==  1]), digits = 3, nsmall = 3), sep = " & "), "\\\\", sep = " "), "\n",
	paste(paste(the.var.list[8], format(mean(data$EMPLOYED[data$POL_TREAT == 1 & data$VAL_TREAT == -1]), digits = 3, nsmall = 3), 
		format(mean(data$EMPLOYED[data$POL_TREAT == 1 & data$VAL_TREAT == -9]), digits = 3, nsmall = 3),
		format(mean(data$EMPLOYED[data$POL_TREAT == 1 & data$VAL_TREAT ==  1]), digits = 3, nsmall = 3), sep = " & "), "\\\\", sep = " "), "\n",
	paste(paste(the.var.list[9], format(mean(data$EDUC[data$POL_TREAT == 1 & data$VAL_TREAT == -1]), digits = 3, nsmall = 3), 
		format(mean(data$EDUC[data$POL_TREAT == 1 & data$VAL_TREAT == -9]), digits = 3, nsmall = 3),
		format(mean(data$EDUC[data$POL_TREAT == 1 & data$VAL_TREAT ==  1]), digits = 3, nsmall = 3), sep = " & "), "\\\\", sep = " "), "\n",
		paste("\\", "hline", sep = ""), "\n")





################ 2. Group means

mean.df <- data.frame(PID = c("Republican", "Independent", "Democrat", "All"), 
	UBI = c(mean(data$UBI_SUPPORT[data$PID_BIN == -1 & data$POL_TREAT == -9 & data$VAL_TREAT == -9]), 
		mean(data$UBI_SUPPORT[data$PID_BIN == 0 & data$POL_TREAT == -9 & data$VAL_TREAT == -9]),
		mean(data$UBI_SUPPORT[data$PID_BIN == 1 & data$POL_TREAT == -9 & data$VAL_TREAT == -9]), 
		mean(data$UBI_SUPPORT[data$POL_TREAT == -9 & data$VAL_TREAT == -9])),
	UBI.se = c(NA, NA, NA, NA),
	UBI.lower = c(NA, NA, NA, NA),
	UBI.upper = c(NA, NA, NA, NA))

mean.df$UBI.se[1] <- sd(data$UBI_SUPPORT[data$PID_BIN == -1 & data$POL_TREAT == -9 & data$VAL_TREAT == -9])/
						sqrt(length(data$UBI_SUPPORT[data$PID_BIN == -1 & data$POL_TREAT == -9 & data$VAL_TREAT == -9]))
mean.df$UBI.se[2] <- sd(data$UBI_SUPPORT[data$PID_BIN == 0 & data$POL_TREAT == -9 & data$VAL_TREAT == -9])/
						sqrt(length(data$UBI_SUPPORT[data$PID_BIN == 0 & data$POL_TREAT == -9 & data$VAL_TREAT == -9]))
mean.df$UBI.se[3] <- sd(data$UBI_SUPPORT[data$PID_BIN == 1 & data$POL_TREAT == -9 & data$VAL_TREAT == -9])/
						sqrt(length(data$UBI_SUPPORT[data$PID_BIN == 1 & data$POL_TREAT == -9 & data$VAL_TREAT == -9]))
mean.df$UBI.se[4] <- sd(data$UBI_SUPPORT[data$POL_TREAT == -9 & data$VAL_TREAT == -9])/
						sqrt(length(data$UBI_SUPPORT[data$POL_TREAT == -9 & data$VAL_TREAT == -9]))
mean.df$UBI.lower <- mean.df$UBI - 2*mean.df$UBI.se
mean.df$UBI.upper <- mean.df$UBI + 2*mean.df$UBI.se


mean.ideo.df <- data.frame(PID = c(rep("Republican", 4), rep("Independent", 4), rep("Democrat", 4), rep("All", 4)), 
							PID.num = c(rep(-1, 4), rep(0, 4), rep(1, 4), rep(5, 4)),
							Ideolog = rep(c("Conservative", "Moderate", "Liberal", "All"), 4), # misspelled on purpose
							ideo.num = rep(c(-1, 0, 1, 5), 4),
							n = rep(NA, 16),
							UBI = rep(NA, 16),
							UBI.se = rep(NA, 16),
							UBI.lower = rep(NA, 16),
							UBI.upper = rep(NA, 16))

for(i in 1:length(mean.ideo.df$PID.num)) {
	if(mean.ideo.df$PID.num[i] != 5) { # For specific PIDs
		if(mean.ideo.df$ideo.num[i] != 5) { # For specific ideos
			mean.ideo.df$UBI[i] <- mean(data$UBI_SUPPORT[data$PID_BIN == mean.ideo.df$PID.num[i] & data$IDEO_BIN == mean.ideo.df$ideo.num[i] & 
														data$POL_TREAT == -9 & data$VAL_TREAT == -9])
			mean.ideo.df$n[i] <- length(data$UBI_SUPPORT[data$PID_BIN == mean.ideo.df$PID.num[i] &
														data$IDEO_BIN == mean.ideo.df$ideo.num[i] & data$POL_TREAT == -9 & data$VAL_TREAT == -9])
			mean.ideo.df$UBI.se[i] <- sd(data$UBI_SUPPORT[data$PID_BIN == mean.ideo.df$PID.num[i] & data$IDEO_BIN == mean.ideo.df$ideo.num[i] & 
														data$POL_TREAT == -9 & data$VAL_TREAT == -9])/sqrt(mean.ideo.df$n[i])
		} else { # For all ideos
			mean.ideo.df$UBI[i] <- mean(data$UBI_SUPPORT[data$PID_BIN == mean.ideo.df$PID.num[i] & 
														data$POL_TREAT == -9 & data$VAL_TREAT == -9])
			mean.ideo.df$n[i] <- length(data$UBI_SUPPORT[data$PID_BIN == mean.ideo.df$PID.num[i] & data$POL_TREAT == -9 & data$VAL_TREAT == -9])
			mean.ideo.df$UBI.se[i] <- sd(data$UBI_SUPPORT[data$PID_BIN == mean.ideo.df$PID.num[i] & 
														data$POL_TREAT == -9 & data$VAL_TREAT == -9])/sqrt(mean.ideo.df$n[i])
		}	
	} else { # For all PIDS
		if(mean.ideo.df$ideo.num[i] != 5) { # For specific ideos
			mean.ideo.df$UBI[i] <- mean(data$UBI_SUPPORT[data$IDEO_BIN == mean.ideo.df$ideo.num[i] & 
														data$POL_TREAT == -9 & data$VAL_TREAT == -9])
			mean.ideo.df$n[i] <- length(data$UBI_SUPPORT[data$IDEO_BIN == mean.ideo.df$ideo.num[i] & data$POL_TREAT == -9 & data$VAL_TREAT == -9])
			mean.ideo.df$UBI.se[i] <- sd(data$UBI_SUPPORT[data$IDEO_BIN == mean.ideo.df$ideo.num[i] & 
														data$POL_TREAT == -9 & data$VAL_TREAT == -9])/sqrt(mean.ideo.df$n[i])
		} else { # For all ideos
			mean.ideo.df$UBI[i] <- mean(data$UBI_SUPPORT[data$POL_TREAT == -9 & data$VAL_TREAT == -9])
			mean.ideo.df$n[i] <- length(data$UBI_SUPPORT[data$POL_TREAT == -9 & data$VAL_TREAT == -9])
			mean.ideo.df$UBI.se[i] <- sd(data$UBI_SUPPORT[data$POL_TREAT == -9 & data$VAL_TREAT == -9])/sqrt(mean.ideo.df$n[i])	
		}
	}
}

mean.ideo.df$UBI.lower <- mean.ideo.df$UBI - 2*mean.ideo.df$UBI.se
mean.ideo.df$UBI.upper <- mean.ideo.df$UBI + 2*mean.ideo.df$UBI.se
mean.ideo.df$Group <- ""
mean.ideo.df$Ideology <- factor(mean.ideo.df$Ideolog, levels = c("All", "Conservative", "Moderate", "Liberal"))

#pdf("meanUBInoconditionspidideo.pdf")     # Appendix figure for group means
ggplot(mean.ideo.df, aes(Group, UBI)) +
  	geom_col(alpha = 0.4) + 
	geom_errorbar(aes(ymin = UBI.lower, ymax = UBI.upper), width = 0.3)	+
	facet_grid(vars(PID), vars(Ideology), labeller = label_both) +
	labs(x = "", y = "Average Support for UBI Within Group") +
	ylim(0, 5) + 
	theme_bw() 
dev.off()




################ 3. World clouds
text.Rs <- data$UBI_OE[data$PID_BIN == -1]
text.Is <- data$UBI_OE[data$PID_BIN == 0]
text.Ds <- data$UBI_OE[data$PID_BIN == 1]

# Republicans
docs.Rs <- Corpus(VectorSource(text.Rs))
docs.Rs <- docs.Rs %>%
	tm_map(removeNumbers) %>%
	tm_map(removePunctuation) %>%
	tm_map(stripWhitespace)
docs.Rs <- tm_map(docs.Rs, content_transformer(tolower))
docs.Rs <- tm_map(docs.Rs, removeWords, stopwords("english"))

dtm.Rs <- TermDocumentMatrix(docs.Rs)
dtm.matrix.Rs <- as.matrix(dtm.Rs)
words.Rs <- sort(rowSums(dtm.matrix.Rs), decreasing = TRUE)
words.df.Rs <- data.frame(word = names(words.Rs), freq = words.Rs)

length(text.Rs)
words.df.Rs[words.df.Rs$freq > 24,]

set.seed(1)
#pdf("wordcloudRs.pdf")
wordcloud(words = words.df.Rs$word, freq = words.df.Rs$freq, min.freq = 25)
dev.off()

# Independents
docs.Is <- Corpus(VectorSource(text.Is))
docs.Is <- docs.Is %>%
	tm_map(removeNumbers) %>%
	tm_map(removePunctuation) %>%
	tm_map(stripWhitespace)
docs.Is <- tm_map(docs.Is, content_transformer(tolower))
docs.Is <- tm_map(docs.Is, removeWords, stopwords("english"))

dtm.Is <- TermDocumentMatrix(docs.Is)
dtm.matrix.Is <- as.matrix(dtm.Is)
words.Is <- sort(rowSums(dtm.matrix.Is), decreasing = TRUE)
words.df.Is <- data.frame(word = names(words.Is), freq = words.Is)

length(text.Is)
words.df.Is[words.df.Is$freq > 20,]

set.seed(1)
#pdf("wordcloudIs.pdf")
wordcloud(words = words.df.Is$word, freq = words.df.Is$freq, min.freq = 25)
dev.off()


# Democrats
docs.Ds <- Corpus(VectorSource(text.Ds))
docs.Ds <- docs.Ds %>%
	tm_map(removeNumbers) %>%
	tm_map(removePunctuation) %>%
	tm_map(stripWhitespace)
docs.Ds <- tm_map(docs.Ds, content_transformer(tolower))
docs.Ds <- tm_map(docs.Ds, removeWords, stopwords("english"))

dtm.Ds <- TermDocumentMatrix(docs.Ds)
dtm.matrix.Ds <- as.matrix(dtm.Ds)
words.Ds <- sort(rowSums(dtm.matrix.Ds), decreasing = TRUE)
words.df.Ds <- data.frame(word = names(words.Ds), freq = words.Ds)

length(text.Ds)
words.df.Ds[words.df.Ds$freq > 100,]

set.seed(1)
#pdf("wordcloudDs.pdf")
wordcloud(words = words.df.Ds$word, freq = words.df.Ds$freq, min.freq = 25)
dev.off()




################ 4. Main coefficient tables
stargazer(model.b1b, model.b1b.prs , single.row = T, no.space = T,
	covariate.labels = c("Negative value treatment", "Positive value treatment",
						"Negative policy treatment", "Positive policy treatment",
						"Party ID (Democrat)", "Ideology (liberal)", "Income", 
						"Economic retrospections", "Economic prospections", 
						"Concern for deficit (less)", "Voted in 2016", 
						"Employed", "Education level",
						"Negative value treatment * Party ID", 
						"Positive value treatment * Party ID", 
						"Negative value treatment * Ideology",
						"Positive value treatment * Ideology",
						"Negative policy treatment * Ideology",
						"Positive policy treatment * Ideology",
						"Negative policy treatment * Ideology",
						"Positive policy treatment * Ideology",
						"Constant"))

# Placebo test tables
coef(model.collapsetreats.allcovs.placebo)
stargazer(model.collapsetreats.allcovs.placebo, single.row = T, no.space = T,
	covariate.labels = c("Negative value treatment", "Positive value treatment",
						"Negative policy treatment", "Positive policy treatment",
						"Party ID (Democrat)", "Ideology (liberal)", "Income", 
						"Economic retrospections", "Economic prospections", 
						"Concern for deficit (less)", "Voted in 2016", 
						"Employed", "Education level", "Constant"))
						

##################################################################
##################################################################
##################################################################
##################################################################
##################################################################
# Separate version for sample demographics. Note this reads in the original survey data
##################################################################
##################################################################
##################################################################
##################################################################
##################################################################

rm(list = ls())

data <- read.csv("UBI full.csv")
# NA = didn't answer

# UBI support
# 1 = not at all likely to support; 5 = very likely to support (clean the NAs)
table(data$UBI_SUPPORT)
data$UBI_SUPPORT[data$UBI_SUPPORT == 6] <- NA

# Combine the ideology treatments; recode to cons -> liberal to be consistent with UBI
data$IDEOLOGY <- rep(NA, length(data$IDEO_VERY))
data$IDEOLOGY[data$IDEO_VERY == 7 | data$IDEO_EXT == 7] <- 1
data$IDEOLOGY[data$IDEO_VERY == 6 | data$IDEO_EXT == 6] <- 2
data$IDEOLOGY[data$IDEO_VERY == 5 | data$IDEO_EXT == 5] <- 3
data$IDEOLOGY[data$IDEO_VERY == 4 | data$IDEO_EXT == 4] <- 4
data$IDEOLOGY[data$IDEO_VERY == 3 | data$IDEO_EXT == 3] <- 5
data$IDEOLOGY[data$IDEO_VERY == 2 | data$IDEO_EXT == 2] <- 6
data$IDEOLOGY[data$IDEO_VERY == 1 | data$IDEO_EXT == 1] <- 7

table(data$IDEOLOGY, data$IDEO_EXT)
table(data$IDEOLOGY, data$IDEO_VERY)

data$IDEO_BIN <- rep(NA, length(data$IDEOLOGY))
data$IDEO_BIN[data$IDEOLOGY == 1] <- -1
data$IDEO_BIN[data$IDEOLOGY == 2] <- -1
data$IDEO_BIN[data$IDEOLOGY == 3] <- -1
data$IDEO_BIN[data$IDEOLOGY == 4] <- 0
data$IDEO_BIN[data$IDEOLOGY == 5] <- 1
data$IDEO_BIN[data$IDEOLOGY == 6] <- 1
data$IDEO_BIN[data$IDEOLOGY == 7] <- 1


# Combine the branching questions; recode to rep -> dem to be consistent with UBI
data$PID <- rep(NA, length(data$PID1))
# PID: 1 = strong, 2 = nvs, 3 = DK
# indp: 1 = leanr, 2 = leandnvs, 3 = neither, 4 = DK
data$PID[data$PID_REP == 1] <- 1
data$PID[data$PID_REP == 2 | data$PID_REP == 3] <- 2
data$PID[data$PID_INDP == 1] <- 3
data$PID[data$PID_INDP == 3 | data$PID_INDP == 4] <- 4
data$PID[data$PID_INDP == 2] <- 5
data$PID[data$PID_DEM == 2 | data$PID_DEM == 3] <- 6
data$PID[data$PID_DEM == 1] <- 7

table(data$PID, data$PID_REP)
table(data$PID, data$PID_DEM)
table(data$PID, data$PID_INDP)


data$PID_BIN <- rep(NA, length(data$PID))
data$PID_BIN[data$PID == 1] <- -1
data$PID_BIN[data$PID == 2] <- -1
data$PID_BIN[data$PID == 3] <- -1
data$PID_BIN[data$PID == 4] <- 0
data$PID_BIN[data$PID == 5] <- 1
data$PID_BIN[data$PID == 6] <- 1
data$PID_BIN[data$PID == 7] <- 1


# Race
table(data$RACE)
data$OTHERRACE <- rep(NA, length(data$RACE))
for(i in 1:length(data$OTHERRACE)) {
	data$OTHERRACE[i] <- ifelse(as.numeric(as.factor(data$RACE[i])) == 2, 0, data$OTHERRACE[i])
	data$OTHERRACE[i] <- ifelse(as.numeric(as.factor(data$RACE[i])) > 2, 1, data$OTHERRACE[i])
}
table(data$RACE, data$OTHERRACE)

# Dummy for females
data$FEMALE <- ifelse(data$GENDER == 2, 1, 0)
table(data$FEMALE, data$GENDER)

# Recode missing values on EDUCATION
data$EDUC[data$EDUC > 7] <- NA
table(data$EDUC)


# Recode missing values on INCOME
data$INCOME[data$INCOME > 12] <- NA
table(data$INCOME)

# 1 = voted
data$VOTEYES <- rep(NA, length(data$VOTE))
data$VOTEYES[data$VOTE == 1] <- 1
data$VOTEYES[data$VOTE == 2] <- 0
data$VOTEYES[data$VOTE == 3] <- 0
table(data$VOTEYES, data$VOTE)

# 1 = employed
data$EMPLOYED <- rep(NA, length(data$OCCUPATION))
data$EMPLOYED[data$OCCUPATION == 1] <- 1
data$EMPLOYED[data$OCCUPATION == 2] <- 0
table(data$EMPLOYED, data$OCCUPATION)
table(data$EMPLOYED)

		
# Descriptives for variables as used
cat(
	paste("UBI Support & ", paste0(unname(round(summary(data$UBI_SUPPORT)[1:6], digits = 2)), collapse = " & "), " \\\\", sep = ""), 
	paste("Party ID & ", paste0(unname(round(summary(data$PID_BIN)[1:6], digits = 2)), collapse = " & "), " \\\\", sep = ""), 
	paste("Ideology & ", paste0(unname(round(summary(data$IDEO_BIN)[1:6], digits = 2)), collapse = " & "), " \\\\", sep = ""), 
	paste("Income & ", paste0(unname(round(summary(data$INCOME)[1:6], digits = 2)), collapse = " & "), " \\\\", sep = ""), 
	paste("Retrospections & ", paste0(unname(round(summary(data$RETRO)[1:6], digits = 2)), collapse = " & "), " \\\\", sep = ""),
	paste("Prospections & ", paste0(unname(round(summary(data$PROSPECT)[1:6], digits = 2)), collapse = " & "), " \\\\", sep = ""), 
	paste("Concern for deficit & ", paste0(unname(round(summary(data$DEFICIT)[1:6], digits = 2)), collapse = " & "), " \\\\", sep = ""), 
	paste("Voted & ", paste0(unname(round(summary(data$VOTEYES)[1:6], digits = 2)), collapse = " & "), " \\\\", sep = ""), 
	paste("Employed & ", paste0(unname(round(summary(data$EMPLOYED)[1:6], digits = 2)), collapse = " & "), " \\\\", sep = ""), 
	paste("Education & ", paste0(unname(round(summary(data$EDUC)[1:6], digits = 2)), collapse = " & "), " \\\\", sep = ""),
	paste("Female & ", paste0(unname(round(summary(data$FEMALE)[1:6], digits = 2)), collapse = " & "), " \\\\", sep = ""),
 sep = "\n")











